import React, { Component } from 'react'

class Cmp1 extends Component {
    constructor (...props) {
        super(...props)

        this.state ={
           data: 0
        }
    }

    addState () {
        this.setState({data: this.state.data + 1})
    }

    render () {
        return <div>
            <p>{this.state.data}</p>
        </div>
    }
}

export default Cmp1
